package com.server.common.security.code.enums;

import com.server.common.security.code.SecurityUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 接口限制条件
 * @author LXC
 * @date 2023/2/19 23:46
 */
@AllArgsConstructor
@Getter
public enum RequestFrequencyConditionEnum {
    //根据用户编码
    BY_USER_CODE(0, SecurityUtils.getLoginVo().getUserCode()),
    //根据IP地址
    BY_IP_ADDRESS(1, SecurityUtils.getIpAddress()),

    ;

    private final Integer code;

    private final String name;
}
